package normal;

import java.math.BigDecimal;

public class Promotion {

    public BigDecimal calPrice(BigDecimal orderPrice, String buyerType) {
        if (BuyerType.EXCLUSIVE_VIP.name.equals(buyerType)) {
            return orderPrice.multiply(new BigDecimal("0.7"));
        }
        if (BuyerType.SVIP.name.equals(buyerType)) {
            return orderPrice.multiply(new BigDecimal("0.8"));
        }
        if (BuyerType.VIP.name.equals(buyerType)) {
            return orderPrice.multiply(new BigDecimal("0.9"));
        }
        return orderPrice;
    }
}
